// index.js
const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'

Page({
  data: {
    navList : [
      {
        title:"查课表",
        icon:"/asset/image/1 (4).png",
        path:"/pages/index/index"
      },
      {
        title:"查成绩",
        icon:"/asset/image/1 (3).png",
        path:"/pages/index/index"
      },
      {
        title:"查考勤",
        icon:"/asset/image/1 (2).png",
        path:"/pages/score/index"
      },
      {
        title:"校历",
        icon:"/asset/image/1 (1).png",
        path:"/pages/index/index"
      },
    ]
    },
    onLoad() {
      this.setData({
        nbTitle: '首页',
        nbLoading: false,
        nbFrontColor: '#000000',
        nbBackgroundColor: '#ffffff',
      })
    },

    nav(e){
      const index = e.currentTarget.dataset.index
      const path = this.data.navList[index].path
      wx.navigateTo({
        url: path,
      })
    }


})

